package com.zhangh.summer.admin.controller.log;

import com.zhangh.summer.admin.biz.log.LoginLogBiz;
import com.zhangh.summer.admin.model.bo.LoginLogQuery;
import com.zhangh.summer.admin.model.po.AdLoginLogPO;
import com.zhangh.summer.admin.support.base.JsonResponse;
import com.zhangh.summer.admin.support.ds.common.pager.DataPager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: TODO
 * @author: zhanghui  zhanghlucky@163.com
 * @create: 2021-10-09 00:22
 **/
@RestController
@RequestMapping(value = "/loginLog",method = RequestMethod.POST)
public class LoginLogController {
    @Autowired
    private LoginLogBiz loginLogBiz;

    @RequestMapping("/dataPager")
    public String dataPager(@RequestBody LoginLogQuery query) {
        DataPager<AdLoginLogPO> dataPager=this.loginLogBiz.getLoginLogDataPager(query,query.getPager());
        return new JsonResponse().toJson(dataPager);
    }


}
